2 // NSDictionary+compactDescription.m
5 // Created by J Osborne on 2/19/13.
9 #import "NSDictionary+compactDescription.h"
10 #import "NSString+compactDescription.h"
12 @implementation NSDictionary (compactDescription)
14 -(NSString*)compactDescription
16 NSMutableArray *results = [NSMutableArray new];
17 for (NSString *k in self) {
19 if ([v respondsToSelector:@selector(compactDescription)]) {
20 v = [v compactDescription];
25 [results addObject:[NSString stringWithFormat:@"%@=%@", [k compactDescription], v]];
27 return [NSString stringWithFormat:@"{%@}", [results componentsJoinedByString:@", "]];
30 -(NSString*)compactDescriptionWithoutItemData;
32 NSMutableArray *results = [NSMutableArray new];
33 for (NSString *k in self) {
34 if ([k isEqualToString:kSecValueData]) {
35 [results addObject:[NSString stringWithFormat:@"%@=<not-logged>", [k compactDescription]]];
40 if ([v respondsToSelector:@selector(compactDescription)]) {
41 v = [v compactDescription];
46 [results addObject:[NSString stringWithFormat:@"%@=%@", [k compactDescription], v]];
48 return [NSString stringWithFormat:@"{%@}", [results componentsJoinedByString:@", "]];